import unittest
from time import sleep
from Page.login1 import Page1
from Page.addtest import Page2
from selenium import webdriver


class TestCase1(unittest.TestCase):

    def setUp(self):

        self.driver=webdriver.Edge()
        self.driver.maximize_window()
        lp=Page1(self.driver)
        lp.login('admin','123456')
        print('开始')

    def tearDown(self):
        self.driver.quit()
        sleep(5)
        print('结束')

    def test_01(self):
        po=Page1(self.driver)
        po.dl_dl()

    def test_02(self):
        po = Page2(self.driver)
        sleep(2)
        po.user_yh()
        sleep(2)
        po.user_yhx()
        sleep(2)

if __name__ == '__main__':
    unittest.main()

